<template>
    <n-modal v-model:show="show"
             class="w-11/12 max-w-md rounded-3xl"
             preset="card"
             :bordered="false">
        <n-tabs
                class="card-tabs"
                default-value="signin"
                size="large"
                animated
                justify-content="space-evenly">
            <n-tab-pane name="signin" tab="登录">
                <LoginForm @onSubmit="doHide"></LoginForm>
            </n-tab-pane>
            <n-tab-pane name="signup" tab="注册">
                <RegisterForm @onSubmit="doHide"></RegisterForm>
            </n-tab-pane>
        </n-tabs>
    </n-modal>
</template>

<script setup lang="ts">
import {ref} from "vue";
import LoginForm from "@/components/modal/components/LoginForm.vue";
import RegisterForm from "@/components/modal/components/RegisterForm.vue";


const show = ref(false)


const doShow = () => {
    show.value = true
}
const doHide = () => {
    show.value = false
}
defineExpose({
    doShow,
    doHide
})

</script>

<style scoped>

</style>